/*************************************************************************************
* qTESLA: an efficient post-quantum signature scheme based on the R-LWE problem
*
* Abstract: constants for the NTT
**************************************************************************************/

#include <stdint.h>
#include "params.h"
#include "poly.h"


poly zeta ={

3359531, 2189080, 370173, 677362, 3132616, 2989204, 2362181, 1720831, 1203721, 3239574, 641414, 3932234, 3634017, 2251707, 355329, 4152265, 
1356023, 4021436, 1465601, 4145892, 3348341, 675693, 1598775, 2799365, 3336234, 3856839, 603157, 1381183, 1069471, 2142038, 2877387, 2653969, 
2055310, 3837123, 3141231, 1951522, 2375048, 445122, 1689285, 3664328, 676319, 3844199, 3669724, 1009639, 3666694, 1585701, 2102892, 966523, 
4069555, 3246046, 846643, 2088895, 4068915, 3715722, 4119007, 230501, 1626667, 2119752, 1171284, 3153846, 17941, 1316589, 1814059, 3185686, 
1183551, 2533671, 4152595, 2616162, 3015757, 194860, 1601807, 1271569, 139534, 2581874, 2183200, 2060697, 1036874, 646550, 2823563, 3312274, 
391700, 99391, 638903, 2397164, 3924868, 3315551, 1170767, 422539, 1801679, 166402, 742283, 222557, 522210, 3415900, 177835, 3243355, 
4196855, 1821376, 1290490, 3624896, 1546898, 1282351, 3960516, 835944, 2251927, 90910, 3034838, 4082965, 2311377, 3512216, 2652413, 2191140, 
302935, 3866228, 2007511, 744185, 2801160, 3993630, 592962, 795067, 2822609, 3471782, 3710854, 1824985, 1495256, 3906591, 3111335, 3902620, 
11234, 1586236, 3698245, 492808, 2729660, 3369937, 1869963, 7244, 1453951, 1757304, 1005437, 3668653, 1821321, 4203686, 1192473, 113408, 
2904803, 1346735, 4161890, 711442, 4020959, 1164150, 2139014, 4134238, 731747, 3856202, 2351090, 3382729, 2644693, 617098, 2796766, 1911274, 
552932, 2476095, 1801797, 1381577, 2338697, 1336590, 2798544, 459121, 3555631, 741068, 2302686, 1883916, 2148181, 2471691, 2174195, 1684042, 
3266036, 227434, 4107207, 2910899, 3427718, 2011049, 2706372, 4182237, 1243355, 2908998, 15068, 1966206, 2157082, 4114100, 1846352, 230880, 
1161075, 1259576, 1212857, 1697580, 39500, 3079648, 2529577, 2082167, 50282, 476606, 1494601, 1334236, 3349015, 1600445, 413060, 3104844, 
139283, 1688398, 3230017, 1009712, 614253, 2973529, 2077610, 2218429, 4185344, 254428, 506799, 196179, 3310395, 4183346, 3897905, 2234639, 
1859699, 3322900, 2151737, 1904476, 2457045, 383438, 2543045, 2985636, 731083, 1609871, 2171434, 535413, 2666041, 405934, 3303186, 802974, 
3573046, 1760267, 2758359, 2102800, 1512274, 3981750, 1838169, 2101846, 1363757, 1342163, 3608830, 321523, 1072908, 855117, 1679204, 3624675, 
3183259, 2438624, 407591, 1549799, 490068, 2769318, 3185950, 990968, 3700398, 2715638, 3672301, 3203080, 1775408, 2071611, 778637, 2335351, 
3317014, 3768001, 571163, 2618746, 1028702, 3174131, 764504, 1386439, 4188876, 1131998, 1057083, 39651, 2588805, 2519763, 3838931, 4130059, 
1893001, 2066802, 572208, 2529031, 220967, 3880345, 1820301, 2205978, 3036090, 1648541, 4012391, 1432533, 3068186, 1645476, 1397186, 2112498, 
4168213, 1234734, 1648052, 1803157, 2011730, 1648875, 2547914, 437873, 2460774, 3403214, 2690605, 2567052, 739775, 1854855, 520305, 3661464, 
1120944, 1245195, 1147367, 2571134, 696367, 3009976, 834907, 1691662, 1384090, 2795844, 1813845, 3425954, 4194068, 1317042, 2056507, 470026, 
3097617, 2678203, 3077203, 2116013, 4155561, 2844478, 1467696, 4150754, 992951, 471101, 4062883, 1584992, 2252609, 3322854, 1597940, 3581574, 
1115369, 4153697, 3236495, 4075586, 2066340, 1262360, 2730720, 3664692, 2681478, 2929295, 3831713, 3683420, 2511172, 3689552, 2645837, 2414330, 
857564, 3703853, 468246, 1574274, 3590547, 2348366, 1565207, 1815326, 2508730, 1749217, 465029, 260794, 1630097, 3019607, 3872759, 1053481, 
3958758, 3415305, 54348, 2516, 3045515, 3011542, 1951553, 1882613, 1729323, 801736, 3662451, 909634, 2949838, 2598628, 1652685, 1945350, 
3221627, 2879417, 2732226, 3883548, 1891328, 3215710, 3159721, 1318941, 2153764, 1870381, 4039453, 3375151, 2655219, 4089723, 1388508, 3436490, 
3956335, 2748982, 4111030, 328986, 1780674, 2570336, 2608795, 2600572, 2748827, 790335, 1988956, 3946950, 1789942, 710384, 3900335, 457139, 
2550557, 3042298, 1952120, 1998308, 259999, 2361900, 119023, 3680445, 1893737, 4050016, 2696786, 567472, 3085466, 1580931, 1360307, 3075154, 
904205, 1306381, 3257843, 2926984, 2065676, 3221598, 2551064, 1580354, 1636374, 699891, 1821560, 670885, 947258, 2908840, 3049868, 1038075, 
1701447, 2439140, 2048478, 3183312, 2224644, 320592, 3304074, 2611056, 422256, 1752180, 2217951, 2900510, 1321050, 2797671, 312886, 2624042, 
3166863, 908176, 24947, 152205, 2891981, 189908, 1959427, 1365987, 2071767, 1932065, 3185693, 3889374, 3644713, 79765, 969178, 11268, 
1992233, 1579325, 1224905, 3741957, 1894871, 3060100, 1787540, 4194180, 1396587, 2745514, 26822, 695515, 2348201, 249698, 2988539, 1081347, 
};


poly zetainv ={

1217030, 3955871, 1857368, 3510054, 4178747, 1460055, 2808982, 11389, 2418029, 1145469, 2310698, 463612, 2980664, 2626244, 2213336, 4194301, 
3236391, 4125804, 560856, 316195, 1019876, 2273504, 2133802, 2839582, 2246142, 4015661, 1313588, 4053364, 4180622, 3297393, 1038706, 1581527, 
3892683, 1407898, 2884519, 1305059, 1987618, 2453389, 3783313, 1594513, 901495, 3884977, 1980925, 1022257, 2157091, 1766429, 2504122, 3167494, 
1155701, 1296729, 3258311, 3534684, 2384009, 3505678, 2569195, 2625215, 1654505, 983971, 2139893, 1278585, 947726, 2899188, 3301364, 1130415, 
2845262, 2624638, 1120103, 3638097, 1508783, 155553, 2311832, 525124, 4086546, 1843669, 3945570, 2207261, 2253449, 1163271, 1655012, 3748430, 
305234, 3495185, 2415627, 258619, 2216613, 3415234, 1456742, 1604997, 1596774, 1635233, 2424895, 3876583, 94539, 1456587, 249234, 769079, 
2817061, 115846, 1550350, 830418, 166116, 2335188, 2051805, 2886628, 1045848, 989859, 2314241, 322021, 1473343, 1326152, 983942, 2260219, 
2552884, 1606941, 1255731, 3295935, 543118, 3403833, 2476246, 2322956, 2254016, 1194027, 1160054, 4203053, 4151221, 790264, 246811, 3152088, 
332810, 1185962, 2575472, 3944775, 3740540, 2456352, 1696839, 2390243, 2640362, 1857203, 615022, 2631295, 3737323, 501716, 3348005, 1791239, 
1559732, 516017, 1694397, 522149, 373856, 1276274, 1524091, 540877, 1474849, 2943209, 2139229, 129983, 969074, 51872, 3090200, 623995, 
2607629, 882715, 1952960, 2620577, 142686, 3734468, 3212618, 54815, 2737873, 1361091, 50008, 2089556, 1128366, 1527366, 1107952, 3735543, 
2149062, 2888527, 11501, 779615, 2391724, 1409725, 2821479, 2513907, 3370662, 1195593, 3509202, 1634435, 3058202, 2960374, 3084625, 544105, 
3685264, 2350714, 3465794, 1638517, 1514964, 802355, 1744795, 3767696, 1657655, 2556694, 2193839, 2402412, 2557517, 2970835, 37356, 2093071, 
2808383, 2560093, 1137383, 2773036, 193178, 2557028, 1169479, 1999591, 2385268, 325224, 3984602, 1676538, 3633361, 2138767, 2312568, 75510, 
366638, 1685806, 1616764, 4165918, 3148486, 3073571, 16693, 2819130, 3441065, 1031438, 3176867, 1586823, 3634406, 437568, 888555, 1870218, 
3426932, 2133958, 2430161, 1002489, 533268, 1489931, 505171, 3214601, 1019619, 1436251, 3715501, 2655770, 3797978, 1766945, 1022310, 580894, 
2526365, 3350452, 3132661, 3884046, 596739, 2863406, 2841812, 2103723, 2367400, 223819, 2693295, 2102769, 1447210, 2445302, 632523, 3402595, 
902383, 3799635, 1539528, 3670156, 2034135, 2595698, 3474486, 1219933, 1662524, 3822131, 1748524, 2301093, 2053832, 882669, 2345870, 1970930, 
307664, 22223, 895174, 4009390, 3698770, 3951141, 20225, 1987140, 2127959, 1232040, 3591316, 3195857, 975552, 2517171, 4066286, 1100725, 
3792509, 2605124, 856554, 2871333, 2710968, 3728963, 4155287, 2123402, 1675992, 1125921, 4166069, 2507989, 2992712, 2945993, 3044494, 3974689, 
2359217, 91469, 2048487, 2239363, 4190501, 1296571, 2962214, 23332, 1499197, 2194520, 777851, 1294670, 98362, 3978135, 939533, 2521527, 
2031374, 1733878, 2057388, 2321653, 1902883, 3464501, 649938, 3746448, 1407025, 2868979, 1866872, 2823992, 2403772, 1729474, 3652637, 2294295, 
1408803, 3588471, 1560876, 822840, 1854479, 349367, 3473822, 71331, 2066555, 3041419, 184610, 3494127, 43679, 2858834, 1300766, 4092161, 
3013096, 1883, 2384248, 536916, 3200132, 2448265, 2751618, 4198325, 2335606, 835632, 1475909, 3712761, 507324, 2619333, 4194335, 302949, 
1094234, 298978, 2710313, 2380584, 494715, 733787, 1382960, 3410502, 3612607, 211939, 1404409, 3461384, 2198058, 339341, 3902634, 2014429, 
1553156, 693353, 1894192, 122604, 1170731, 4114659, 1953642, 3369625, 245053, 2923218, 2658671, 580673, 2915079, 2384193, 8714, 962214, 
4027734, 789669, 3683359, 3983012, 3463286, 4039167, 2403890, 3783030, 3034802, 890018, 280701, 1808405, 3566666, 4106178, 3813869, 893295, 
1382006, 3559019, 3168695, 2144872, 2022369, 1623695, 4066035, 2934000, 2603762, 4010709, 1189812, 1589407, 52974, 1671898, 3022018, 1019883, 
2391510, 2888980, 4187628, 1051723, 3034285, 2085817, 2578902, 3975068, 86562, 489847, 136654, 2116674, 3358926, 959523, 136014, 3239046, 
2102677, 2619868, 538875, 3195930, 535845, 361370, 3529250, 541241, 2516284, 3760447, 1830521, 2254047, 1064338, 368446, 2150259, 1551600, 
1328182, 2063531, 3136098, 2824386, 3602412, 348730, 869335, 1406204, 2606794, 3529876, 857228, 59677, 2739968, 184133, 2849546, 53304, 
3850240, 1953862, 571552, 273335, 3564155, 965995, 3001848, 2484738, 1843388, 1216365, 1072953, 3528207, 3835396, 2016489, 846038, 3124222, 
};